#ifndef     __ARRAY_H
#define     __ARRAY_H

#include "./base.h"

namespace utils {

template <typename EleType, usize_t Capacity>
struct Array {

    static constexpr usize_t MAX_LEN = Capacity;

    inline Array() : len(0) {}

    inline EleType& operator[](usize_t index) {
        return data[index];
    }

    inline const EleType& operator[](usize_t index) const {
        return data[index];
    }

    EleType data[Capacity];
    usize_t len;
};

using Uint8Array = Array<uint8_t, 4>;
using Uint16Array = Array<uint16_t, 4>;
using Uint32Array = Array<uint32_t, 4>;

}


#endif
